package main
import(
	"database/sql"
	_ "github.com/lib/pq"
)
func openSql() (*sql.DB, error) {
	return sql.Open("postgres", "user=ubuntu password=123456 dbname=testdb sslmode=disable")
}

func main()
{
	db,err:=openSql()
	if err!=nil {
		panic(err)
	}
}